package com.hyperfix.utils.common.auth;

import java.util.HashSet;
import java.util.Set;

/**
 * @author JiangChunYu
 * 2024/4/14
 */
public class WhiteURLRegistrar {
    private static final Set<String> WHITE_URL_SET = new HashSet<>();
    public static final String WS_URL = "ws";
    static {
        WHITE_URL_SET.add("/login_auth"); // 登录
        WHITE_URL_SET.add("/captcha"); // 验证码
        WHITE_URL_SET.add("/findPassword"); // 找回密码
    }

    public static boolean isWhiteURL(String path) {
        for (String url : WHITE_URL_SET) {
            if (path.contains(url)) {
                return true;
            }
        }
        return false;
    }
}
